Initialize
NEW WITH CONTEXTUAL MENUS
Performs any required plug-in initialization. If you write a contextual menu plug-in, you may include anInitialize
method with the following form:
OSStatus Initialize (FSSpec *inFileSpec);
inFileSpec
- A pointer to a file system specification record for the file that contains the plug-in.
- method result
- A result code. See "Result Codes" for a list of possible values. If this value is not
noErr
then the Menu Manager does not use the plug-in.DISCUSSION
TheInitialize
method is called when the Menu Manager builds its registry of available plug-ins (typically at system startup). You should use theInitialize
method to check for available resources before the plug-in is actually required. To maintain a small memory footprint, theInitialize
method should not allocate any memory, buffers, or so on. Instead, you should allocate memory as needed when examining the context or acting on the selection.